1. Field of the Invention
This invention relates to a focus detecting method and a focus detecting apparatus suitable for application, for example, to the auto focus mechanism portion of a semiconductor inspecting apparatus for recognizing and inspecting a predetermined pattern from among objects to be inspected or a video camera.
2. Related Background Art
A semiconductor inspecting apparatus for recognizing and inspecting a predetermined pattern from among objects to be inspected or a video camera used for common people's livelihood is provided with an auto focus mechanism for grasping the clear-cut real image of an image pickup object always on an image pickup element. As automatic focus detecting methods for an image pickup object, there are usually used an active method of applying illuminating light or laser light for focal position detection to the image pickup object and monitoring any variation in the intensity of reflected light to thereby effect focusing, and a passive method of detecting the signal of the edge portion of any pattern from a picked-up image signal and controlling the focal position so that the image may become sharpest.
The active method is often used, for example, for microscopic observation images or the like. The passive method is often used, for example, for the automatic focusing or the like of video cameras.
However, in case of the active method, the detection object of the focal position is limited only to the image pickup object surface in a predetermined focal position detection area. Therefore, where the position of the image pickup object gradually deviates in the image field, there is the possibility of focusing being effected on a different image pickup object surface. On the other hand, where the passive method is used, if a plurality of objects differing in distance exist in the image field, there is the possibility of focusing being effected on an object not intended by the operator, depending on which object is selected as the object of edge detection.
That is, the focus detecting methods according to the prior art have suffered from the inconvenience that focusing can be effected only on a particular pattern or a particular object irrespective of the position thereof in the image field. Even in the focus detecting methods according to the prior art, if, for example, the operator changes the focus detection area in the image field in pursuit of the movement of an image pickup object, focusing can be effected on that image pickup object, but this not only requires a long processing time but also is bad in operability.